CIRCLE
CIRCLE_R
ELLIPSE
ELLIPSE_R

Syntax:
   CIRCLE [#ch,] x,y,radius [,ratio,ecc] {;x,y,radius [,ratio,ecc]}
   CIRCLE_R [#ch,] x,y,radius [,ratio,ecc] {;x,y,radius [,ratio,ecc]}
   ELLIPSE [#ch,] x,y,radius [,ratio,ecc] {;x,y,radius [,ratio,ecc]}
   ELLIPSE_R [#ch,] x,y,radius [,ratio,ecc] {;x,y,radius [,ratio,ecc]}
Location: QL ROM

CIRCLE and ELLIPSE are in fact the same command.

CIRCLE allows you to draw a circle of the given radius with its centre point at the point (x,y).

The positioning and size of the circle will actually depend upon the scale and shape of the specified window (default #1).

The co-ordinates are calculated by reference to the graphics origin, and the graphics pointer will be set to the centre point of the last circle to be drawn on completion of the command.

If any parts of the circle lie outside of the specified window, they will not be drawn (there will not be an Overflow Error).

This command will actually allow you to draw multiple circles by including more sets of parameters. Each additional set must be preceded by a semicolon (unlessthe preceding circle uses five parameters).  This means that these commands are all the same:

CIRCLE 100,100,20,1,0,50,50,20
CIRCLE 100,100,20;50,50,20
CIRCLE 100,100,20:CIRCLE 50,50,20

Although the FILL command will allow you to draw filled circles on screen (in the current ink colour), you will need to include a FILL 1 statement prior to each circle if they are to appear independently on screen (this cannot be achieved when using this command to draw multiple circles!). If this rule is not followed, then any points which lie on the same horizontal line (even though they may be in different circles) will be joined.

If the parameters ratio and ecc are specified, then the circle is drawn as an ellipse.

ratio affects the difference between the major axis and the minor axis.  The major (y) axis is specified by the radius parameter, whereas the minor (x) axis iscalculated by ratio*radius.

ecc defines the angle at which the ellipse will be drawn (measured in radians).

CIRCLE_R and ELLIPSE_R are the same as their namesakes, except that the circle/ellipse is drawn relative to the current graphics cursor.
